<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<style>
.btnarea{
    margin-left: -10%;
    padding-top: 12px;
    width:100%;
}

.labelstyle{
    font-weight: bold;
    font-size: 11px;
}
</style>

<div ng-controller="roleAndAuthorityManagementController as controller">
	<div class="wrap">
		<div class="mapTips">
			<h6>
				<i class="glyphicon glyphicon-cog"></i> <span>条件设置</span>
			</h6>
		</div>
		<div class="conditionWrap">
			<div class="wrapFirst" style="height: 57px; margin-bottom: 50px;margin-top: 10px">
				<form role="form" name="tableForm" class="form-horizontal">
					<div class="form-group">
						<div class="row">
							<div class="col-md-10 col-sm-10 col-xs-10">
								<label for="input-userNo_search" class="control-label labelstyle"
									style="padding: 19px 19px 0 3%;float:left;">角色名称:</label>
								<div class="" style="width: 35%; margin-top: 10px;float:left;">	
									<input ng-model="controller.queryCondition.roleName" type="text"
										class="form-control" id="input-roleName_search" placeholder="管理员">
								</div>
							</div>
							<div class="col-md-2 col-sm-2 col-xs-2">
								<div class="btnarea">
									<button type="button" class="btn btn-primary" style="margin-right:6px; width:39%"
									ng-click="controller.search()"> 搜索</button>
							<button type="button" class="btn btn-danger" style="width:39%" 
								ng-click="controller.reset()"> 重置
							</button>
							</div>
						</div>
						</div>
						
						<div style="padding: 19px 0 0 15px;">
							<button class="btn btn-default" style="float:left;margin-right:8px;"type="button" 
								ng-click="controller.createRole()">创建角色</button>
						</div>
						
						<div style="float:left;">
							<button class="btn btn-default" type="button"
								ng-click="controller.delRoles();">删除角色</button>
						</div>
					</div>


					<div class="form-group"></div>
				</form>
			</div>
</div>
		<div class="mapBottom table-bordered"
			style="font-size: 13px; background: white;">
			<table class="table table-bordered" style="font-size: 13px;">
				<tr>
					<th style="width: 1%; text-align: center" ><input type="checkbox" id="check_all" /></th>
					<th style="text-align: center">角色名称</th>
					<th style="text-align: center">角色简介</th>
					<th  style="width: 11%; text-align: center" >操作</th>
				</tr>

				<tr ng-repeat="data in controller.dataList">
					<td style="text-align: center"><input type="checkbox" class="check_item" /></td>
					<td ng-hide="true">{{data.id}}</td>
					<td style="text-align: center">{{data.name}}</td>
					<td style="text-align: center">{{data.description}}</td>
					<td style="text-align: center">
						<button ng-click="controller.changeRolePermissions(data)"
							class="btn btn-primary btn-sm update_btn">MENU权限详情</button>
					</td>

				</tr>
			</table>
			<div class="spagination"
				style="padding-bottom: 63px; position: relative; margin-left: 25%; margin-top: -3%;">
				<div style="position: absolute; margin-left: -10%; margin-top: 3%;">总{{controller.paginationInfo.totalElements}}条记录</div>
				<div style="position: absolute; left: 0px;">
					<ul uib-pagination
						total-items="controller.paginationInfo.totalPages"
						ng-model="controller.queryCondition.page"
						max-size="controller.paginationInfo.maxSize" class="pagination-md"
						boundary-links="true" items-per-page="1" rotate="false"
						ng-change="controller.pageChanged();" previous-text="上一页"
						next-text="下一页" first-text="首页" last-text="最后一页"></ul>
					<div class="col-md-1"
						style="top: 27px; left: 98%; width: 117px; position: absolute;">
						跳转
						<div class="col-md-1"
							style="left: 29%; float: left; top: 21px; position: absolute;">
							<input ng-model="controller.queryCondition.forwordPage"
								ng-keyup="enterEvent($event)" type="text" class="form-control"
								style="height: 33px; width: 50px; top: -28px; position: absolute;">
						</div>
						<div style="position: absolute; top: 0px; left: 94%;">页</div>
					</div>
				</div>
			</div>

		</div>
	</div>
</div>
</div>